package com.fance.dao;

import com.fance.model.Message;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author fance
 * @date 18-5-6 上午9:35
 */
@Mapper
public interface MessageDAO {

    int addMessage(Message message);

    List<Message> getConversationList(@Param("userId") int userId, @Param("offset") int offset, @Param("limit") int limit);


    int getConversationUnReadCount(@Param("userId") int userId, @Param("conversationId") String conversationId);

    int getConversationTotalCount(@Param("userId") int userId);

    List<Message> getConversationDetail(@Param("conversationId") String conversationId, @Param("offset") int offset, @Param("limit") int limit);
}
